TIME$ Function Action Returns the current time from the operating system. Syntax TIME$ Remarks The TIME$ function returns an eight-character string in the form hh. mm. ss, where hh is the hour (00 - 23), mm is minutes (00 - 59), and ss is seconds (00 - 59). A 24-hour clock is used; therefore, 8.00 P.M. is shown as 20.00.00. To set the time, use the TIME$ statement. See Also TIME$ Statement, TIMER Function Example The following example converts the 24-hour clock used by TIME$ to 12-hour output. T$ = TIME$ Hr = VAL(T$) IF Hr < 12 THEN Ampm$ = " AM" ELSE Ampm$ = " PM" IF Hr > 12 THEN Hr = Hr - 12 PRINT "The time is" STR$(Hr) RIGHT$(T$,6) Ampm$ Output The time is 11.26.31 AM